From 12a03a9a72f7895d571dbaeeb245d92aa277a610 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 6 Oct 2023 17:48:03 +0200
Subject: refactor(components): merge HeadingButton and Widget components

The HeadingButton component was only used inside Widget component and
it is not very useful on its own so I merge the two components in a
new Collapsible component.
---
 src/pages/sujet/[slug].tsx | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

(limited to 'src/pages/sujet/[slug].tsx')

diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx
index 94541b9..8e3100f 100644
--- a/src/pages/sujet/[slug].tsx
+++ b/src/pages/sujet/[slug].tsx
@@ -137,18 +137,24 @@ const TopicPage: NextPageWithLayout<TopicPageProps> = ({
           thematics
             ? [
                 <LinksListWidget
+                  heading={
+                    <Heading isFake level={3}>
+                      {thematicsListTitle}
+                    </Heading>
+                  }
+                  items={getLinksListItems(thematics)}
                   // eslint-disable-next-line react/jsx-no-literals -- Key allowed
                   key="related-thematics"
-                  items={getLinksListItems(thematics)}
-                  title={thematicsListTitle}
-                  level={2}
                 />,
                 <LinksListWidget
+                  heading={
+                    <Heading isFake level={3}>
+                      {topicsListTitle}
+                    </Heading>
+                  }
+                  items={getLinksListItems(topics)}
                   // eslint-disable-next-line react/jsx-no-literals -- Key allowed
                   key="topics"
-                  items={getLinksListItems(topics)}
-                  title={topicsListTitle}
-                  level={2}
                 />,
               ]
             : []
-- 
cgit v1.2.3

